#include"lottery_sys.h"
#include"ui.h"
/*
 该函数用于：对已处理好的的用户链表的文件化操作
 无返回值
 参数：该用户链表的头结点
 
 */
void save_user_list(Buyer_t* user_head)
{
	FILE* fp = NULL;
	Buyer_t* cur = NULL;
	if(NULL == user_head)
	{
		return;
	}
	fp = fopen(USER_FILE,"w");
	if(NULL == fp)
	{
		return;
	}
	cur = user_head -> next;
	while(cur != NULL)
	{
		fwrite(cur,sizeof(Buyer_t),1,fp);
		cur = cur -> next;
	}
	fclose(fp);
}
